import React, { Component } from 'react'
import { getMsg, getuserdynamic } from '../../../redux/actionCreator'
import MyListView from '../../Dynamic/MyListView'
import { connect } from 'react-redux'
import { withRouter } from "react-router-dom";
class Release extends Component {
    constructor(props) {
        super(props)
        this.state = {

        }
        this.props.dispatch(getuserdynamic(getMsg(this.props).user_id))
    }
    render() {
        return (
            <div style={{ minHeight: '100vh', display: 'flex', width: '100%' }}>

                <div style={{ backgroundColor: "#080904", minHeight: '100vh', display: 'flex', width: '100%' }}>

                    <div style={{ width: '100%', margin: '0 auto' }}>
                        <div style={{ height: '20px' }}></div>
                        
                        <i className="iconfont icon-fanhui" style={{ fontSize: '1.7em', position: 'relative', left: '5%' }} onClick={() => this.props.history.goBack()}></i>
                        <div style={{ width: '90%', position: 'relative', left: '5%', fontSize: '1.5em', fontWeight: 'bold', paddingTop: '25px', paddingBottom: '20px', position: 'relative' }}>我的发布</div>

                        <div className='release'>
                            <MyListView />
                        </div>

                    </div>
                </div>
                <div style={{ flex: '1' }}></div>
            </div>
        )
    }
}
const mapStateToProps = (state) => {
    return {
        login: state.login,
        dynamic: state.dynamic
    }
}

export default withRouter(connect(mapStateToProps)(Release))